using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class LbsResponse : GeneratedMessageLite<LbsResponse, LbsResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<LbsResponse, LbsResponse.Builder>
		{
			private bool resultIsReadOnly;
			private LbsResponse result;
			protected override LbsResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override LbsResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override LbsResponse DefaultInstanceForType
			{
				get
				{
					return LbsResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint ContactCount
			{
				get
				{
					return this.result.ContactCount;
				}
				set
				{
					this.SetContactCount(value);
				}
			}
			public IPopsicleList<LbsContactInfo> ContactListList
			{
				get
				{
					return this.PrepareBuilder().contactList_;
				}
			}
			public int ContactListCount
			{
				get
				{
					return this.result.ContactListCount;
				}
			}
			public uint State
			{
				get
				{
					return this.result.State;
				}
				set
				{
					this.SetState(value);
				}
			}
			public uint FlushTime
			{
				get
				{
					return this.result.FlushTime;
				}
				set
				{
					this.SetFlushTime(value);
				}
			}
			public Builder()
			{
				this.result = LbsResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(LbsResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private LbsResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					LbsResponse other = this.result;
					this.result = new LbsResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override LbsResponse.Builder Clear()
			{
				this.result = LbsResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override LbsResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new LbsResponse.Builder(this.result);
				}
				return new LbsResponse.Builder().MergeFrom(this.result);
			}
			public override LbsResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override LbsResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is LbsResponse)
				{
					return this.MergeFrom((LbsResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override LbsResponse.Builder MergeFrom(LbsResponse other)
			{
				return this;
			}
			public override LbsResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override LbsResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(LbsResponse._lbsResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = LbsResponse._lbsResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasContactCount = input.ReadUInt32(ref this.result.contactCount_);
							continue;
						}
					}
					else
					{
						if (num3 == 26u)
						{
							input.ReadMessageArray<LbsContactInfo>(num, text, this.result.contactList_, LbsContactInfo.DefaultInstance, extensionRegistry);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasState = input.ReadUInt32(ref this.result.state_);
							continue;
						}
						if (num3 == 40u)
						{
							this.result.hasFlushTime = input.ReadUInt32(ref this.result.flushTime_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public LbsResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public LbsResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public LbsResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public LbsResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public LbsResponse.Builder SetContactCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasContactCount = true;
				this.result.contactCount_ = value;
				return this;
			}
			public LbsResponse.Builder ClearContactCount()
			{
				this.PrepareBuilder();
				this.result.hasContactCount = false;
				this.result.contactCount_ = 0u;
				return this;
			}
			public LbsContactInfo GetContactList(int index)
			{
				return this.result.GetContactList(index);
			}
			public LbsResponse.Builder SetContactList(int index, LbsContactInfo value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.contactList_[index] = value;
				return this;
			}
			public LbsResponse.Builder SetContactList(int index, LbsContactInfo.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.contactList_[index] = builderForValue.Build();
				return this;
			}
			public LbsResponse.Builder AddContactList(LbsContactInfo value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.contactList_.Add(value);
				return this;
			}
			public LbsResponse.Builder AddContactList(LbsContactInfo.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.contactList_.Add(builderForValue.Build());
				return this;
			}
			public LbsResponse.Builder AddRangeContactList(IEnumerable<LbsContactInfo> values)
			{
				this.PrepareBuilder();
				this.result.contactList_.Add(values);
				return this;
			}
			public LbsResponse.Builder ClearContactList()
			{
				this.PrepareBuilder();
				this.result.contactList_.Clear();
				return this;
			}
			public LbsResponse.Builder SetState(uint value)
			{
				this.PrepareBuilder();
				this.result.hasState = true;
				this.result.state_ = value;
				return this;
			}
			public LbsResponse.Builder ClearState()
			{
				this.PrepareBuilder();
				this.result.hasState = false;
				this.result.state_ = 0u;
				return this;
			}
			public LbsResponse.Builder SetFlushTime(uint value)
			{
				this.PrepareBuilder();
				this.result.hasFlushTime = true;
				this.result.flushTime_ = value;
				return this;
			}
			public LbsResponse.Builder ClearFlushTime()
			{
				this.PrepareBuilder();
				this.result.hasFlushTime = false;
				this.result.flushTime_ = 0u;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int ContactCountFieldNumber = 2;
		public const int ContactListFieldNumber = 3;
		public const int StateFieldNumber = 4;
		public const int FlushTimeFieldNumber = 5;
		private static readonly LbsResponse defaultInstance;
		private static readonly string[] _lbsResponseFieldNames;
		private static readonly uint[] _lbsResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasContactCount;
		private uint contactCount_;
		private PopsicleList<LbsContactInfo> contactList_ = new PopsicleList<LbsContactInfo>();
		private bool hasState;
		private uint state_;
		private bool hasFlushTime;
		private uint flushTime_;
		private int memoizedSerializedSize = -1;
		public static LbsResponse DefaultInstance
		{
			get
			{
				return LbsResponse.defaultInstance;
			}
		}
		public override LbsResponse DefaultInstanceForType
		{
			get
			{
				return LbsResponse.DefaultInstance;
			}
		}
		protected override LbsResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint ContactCount
		{
			get
			{
				return this.contactCount_;
			}
		}
		public IList<LbsContactInfo> ContactListList
		{
			get
			{
				return this.contactList_;
			}
		}
		public int ContactListCount
		{
			get
			{
				return this.contactList_.Count;
			}
		}
		public uint State
		{
			get
			{
				return this.state_;
			}
		}
		public uint FlushTime
		{
			get
			{
				return this.flushTime_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseResponse)
				{
					return false;
				}
				if (!this.hasContactCount)
				{
					return false;
				}
				if (!this.BaseResponse.IsInitialized)
				{
					return false;
				}
				bool result;
				using (IEnumerator<LbsContactInfo> enumerator = this.ContactListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						LbsContactInfo current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasContactCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.ContactCount);
				}
				using (IEnumerator<LbsContactInfo> enumerator = this.ContactListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						LbsContactInfo current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				if (this.hasState)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.State);
				}
				if (this.hasFlushTime)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.FlushTime);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private LbsResponse()
		{
		}
		public LbsContactInfo GetContactList(int index)
		{
			return this.contactList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] lbsResponseFieldNames = LbsResponse._lbsResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, lbsResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasContactCount)
			{
				output.WriteUInt32(2, lbsResponseFieldNames[1], this.ContactCount);
			}
			if (this.contactList_.Count > 0)
			{
				output.WriteMessageArray<LbsContactInfo>(3, lbsResponseFieldNames[2], this.contactList_);
			}
			if (this.hasState)
			{
				output.WriteUInt32(4, lbsResponseFieldNames[4], this.State);
			}
			if (this.hasFlushTime)
			{
				output.WriteUInt32(5, lbsResponseFieldNames[3], this.FlushTime);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasContactCount)
			{
				num ^= this.contactCount_.GetHashCode();
			}
			using (IEnumerator<LbsContactInfo> enumerator = this.contactList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					LbsContactInfo current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			if (this.hasState)
			{
				num ^= this.state_.GetHashCode();
			}
			if (this.hasFlushTime)
			{
				num ^= this.flushTime_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			LbsResponse lbsResponse = value as LbsResponse;
			if (lbsResponse == null)
			{
				return false;
			}
			if (this.hasBaseResponse != lbsResponse.hasBaseResponse || (this.hasBaseResponse && !this.baseResponse_.Equals(lbsResponse.baseResponse_)))
			{
				return false;
			}
			if (this.hasContactCount != lbsResponse.hasContactCount || (this.hasContactCount && !this.contactCount_.Equals(lbsResponse.contactCount_)))
			{
				return false;
			}
			if (this.contactList_.Count != lbsResponse.contactList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.contactList_.Count; i++)
			{
				if (!this.contactList_[i].Equals(lbsResponse.contactList_[i]))
				{
					return false;
				}
			}
			return this.hasState == lbsResponse.hasState && (!this.hasState || this.state_.Equals(lbsResponse.state_)) && (this.hasFlushTime == lbsResponse.hasFlushTime && (!this.hasFlushTime || this.flushTime_.Equals(lbsResponse.flushTime_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<LbsResponse, LbsResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<LbsResponse, LbsResponse.Builder>.PrintField("ContactCount", this.hasContactCount, this.contactCount_, writer);
			GeneratedMessageLite<LbsResponse, LbsResponse.Builder>.PrintField<LbsContactInfo>("ContactList", this.contactList_, writer);
			GeneratedMessageLite<LbsResponse, LbsResponse.Builder>.PrintField("State", this.hasState, this.state_, writer);
			GeneratedMessageLite<LbsResponse, LbsResponse.Builder>.PrintField("FlushTime", this.hasFlushTime, this.flushTime_, writer);
		}
		public static LbsResponse ParseFrom(byte[] data)
		{
			return LbsResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private LbsResponse MakeReadOnly()
		{
			this.contactList_.MakeReadOnly();
			return this;
		}
		public static LbsResponse.Builder CreateBuilder()
		{
			return new LbsResponse.Builder();
		}
		public override LbsResponse.Builder ToBuilder()
		{
			return LbsResponse.CreateBuilder(this);
		}
		public override LbsResponse.Builder CreateBuilderForType()
		{
			return new LbsResponse.Builder();
		}
		public static LbsResponse.Builder CreateBuilder(LbsResponse prototype)
		{
			return new LbsResponse.Builder(prototype);
		}
		static LbsResponse()
		{
			LbsResponse.defaultInstance = new LbsResponse().MakeReadOnly();
			LbsResponse._lbsResponseFieldNames = new string[]
			{
				"BaseResponse",
				"ContactCount",
				"ContactList",
				"FlushTime",
				"State"
			};
			LbsResponse._lbsResponseFieldTags = new uint[]
			{
				10u,
				16u,
				26u,
				40u,
				32u
			};
			object.ReferenceEquals(micromsg.Proto.LbsResponse.Descriptor, null);
		}
	}
}
